package com.ds.console.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件上传记录
 * </p>
 *
 * @author fusheng
 * @since 2024-04-11
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_file")
@Schema(name = "TFile", description = "文件上传记录")
public class TFile implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "分片上传的uploadId")
    private String uploadId;

    @Schema(description = "文件唯一标识（md5）")
    private String fileMd5;

    @Schema(description = "文件名")
    private String fileName;

    @Schema(description = "桶名")
    private String bucketName;

    @Schema(description = "文件存储路径")
    private String objectName;

    @Schema(description = "文件大小（byte）")
    private Long fileSize;

    @Schema(description = "每个分片大小（byte）")
    private Long chunkSize;

    @Schema(description = "分片数量")
    private Integer chunkNum;

    @Schema(description = "是否上传完成(1：是  0：否)")
    private Byte isFinish;
}
